package lab01;

import java.util.Scanner;

class Employee{
    private String name;
    private int age;
    private double salary;

    public Employee(String name, int age, double salary) {
        this.name = name;
        this.age = age;
        this.salary = salary;
    }

    public Employee() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }
}

public class Excise01 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Employee employee = new Employee();
        System.out.println("请输入员工姓名：");
        employee.setName(scanner.nextLine());
        System.out.println("请输入员工年龄");
        employee.setAge(scanner.nextInt());
        System.out.println("请输入员工每月工资：");
        employee.setSalary(scanner.nextDouble());

        System.out.println("录入信息如下："+"员工姓名："+employee.getName()+"，员工年龄"+employee.getAge()+"，员工工资（每月）："+employee.getSalary());

    }
}

/*请输入员工姓名：
        沈雨
        请输入员工年龄
        24
        请输入员工每月工资：
        6700
        录入信息如下：员工姓名：沈雨，员工年龄24.0，员工工资（每月）：6700.0*/




